Tasks are performed by CPUs. CPUs can comprise of one or more computer cores. In some examples the CPU can have one can, four cores, eight cores, or more cores. The greater number of CPU cores, the greater number of tasks that can be processed in parallel.
The number of CPU cores available is finite. Consequently, tasks are scheduled by a CPU scheduler to prioritize those tasks having higher priority than other tasks.
Tasks or elements associated with tasks can be arranged in a priority list. Ideally tasks can be executed in order of priority. However, multiple threads, associated with multiple CPU cores, cannot access the priority queue at any one time. One of the threads must lock the others out to avoid errors in the processing of the tasks. This causes a bottleneck where a CPU core is waiting to process something, but the thread associated with the CPU core cannot access the element in the priority queue because a different thread has locked it.